package com.swe.chums.dao.model;

import com.swe.chums.dao.*;
import com.swe.chums.dao.factory.*;
import com.swe.chums.dao.exceptions.*;
import java.io.Serializable;
import java.util.*;
import java.util.Date;

public class UserActivity implements Serializable
{
	/** 
	 * This attribute maps to the column id in the user_activity table.
	 */
	protected int id;

	/** 
	 * This attribute maps to the column user_id in the user_activity table.
	 */
	protected int userId;

	/** 
	 * This attribute maps to the column activity_type_id in the user_activity table.
	 */
	protected int activityTypeId;

	/** 
	 * This attribute maps to the column web_resource_id in the user_activity table.
	 */
	protected int webResourceId;

	/** 
	 * This attribute maps to the column time in the user_activity table.
	 */
	protected Date time;
        
        protected String activityValue;
        
        protected String activityTypeText;
        
        protected String webResourceText;
        
        protected String userText;

	/**
	 * Method 'UserActivity'
	 * 
	 */
	public UserActivity()
	{
	}

    public String getActivityValue() {
        return activityValue;
    }

    public void setActivityValue(String activityValue) {
        this.activityValue = activityValue;
    }

    public String getActivityTypeText() {
        return activityTypeText;
    }

    public void setActivityTypeText(String activityTypeText) {
        this.activityTypeText = activityTypeText;
    }

    public String getWebResourceText() {
        return webResourceText;
    }

    public void setWebResourceText(String webResourceText) {
        this.webResourceText = webResourceText;
    }

    public String getUserText() {
        return userText;
    }

    public void setUserText(String userText) {
        this.userText = userText;
    }

	/**
	 * Method 'getId'
	 * 
	 * @return int
	 */
	public int getId()
	{
		return id;
	}

	/**
	 * Method 'setId'
	 * 
	 * @param id
	 */
	public void setId(int id)
	{
		this.id = id;
	}

	/**
	 * Method 'getUserId'
	 * 
	 * @return int
	 */
	public int getUserId()
	{
		return userId;
	}

	/**
	 * Method 'setUserId'
	 * 
	 * @param userId
	 */
	public void setUserId(int userId)
	{
		this.userId = userId;
	}

	/**
	 * Method 'getActivityTypeId'
	 * 
	 * @return int
	 */
	public int getActivityTypeId()
	{
		return activityTypeId;
	}

	/**
	 * Method 'setActivityTypeId'
	 * 
	 * @param activityTypeId
	 */
	public void setActivityTypeId(int activityTypeId)
	{
		this.activityTypeId = activityTypeId;
	}

	/**
	 * Method 'getWebResourceId'
	 * 
	 * @return int
	 */
	public int getWebResourceId()
	{
		return webResourceId;
	}

	/**
	 * Method 'setWebResourceId'
	 * 
	 * @param webResourceId
	 */
	public void setWebResourceId(int webResourceId)
	{
		this.webResourceId = webResourceId;
	}

	/**
	 * Method 'getTime'
	 * 
	 * @return Date
	 */
	public Date getTime()
	{
		return time;
	}

	/**
	 * Method 'setTime'
	 * 
	 * @param time
	 */
	public void setTime(Date time)
	{
		this.time = time;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof UserActivity)) {
			return false;
		}
		
		final UserActivity _cast = (UserActivity) _other;
		if (id != _cast.id) {
			return false;
		}
		
		if (userId != _cast.userId) {
			return false;
		}
		
		if (activityTypeId != _cast.activityTypeId) {
			return false;
		}
		
		if (webResourceId != _cast.webResourceId) {
			return false;
		}
		
		if (time == null ? _cast.time != time : !time.equals( _cast.time )) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + id;
		_hashCode = 29 * _hashCode + userId;
		_hashCode = 29 * _hashCode + activityTypeId;
		_hashCode = 29 * _hashCode + webResourceId;
		if (time != null) {
			_hashCode = 29 * _hashCode + time.hashCode();
		}
		
		return _hashCode;
	}

	/**
	 * Method 'createPk'
	 * 
	 * @return UserActivityPk
	 */
	public UserActivityPk createPk()
	{
		return new UserActivityPk(id);
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "com.swe.chums.dao.dto.UserActivity: " );
		ret.append( "id=" + id );
		ret.append( ", userId=" + userId );
		ret.append( ", activityTypeId=" + activityTypeId );
		ret.append( ", webResourceId=" + webResourceId );
		ret.append( ", time=" + time );
		return ret.toString();
	}

}
